package com.boyunv.composite.example02;

import lombok.Data;

/*
 *@description
 * 表示文件
 *@author boyunv
 *@create 2023/8/1 7:20
 *@version 1.0
 */
@Data
public class File extends Entry{
 private String name;
 private int  size;


 public  File(String name,int size){
  this.name=name;
  this.size=size;
 }
 @Override
 public String getName() {
  return name;
 }

 @Override
 public int getSize() {
  return size;
 }

 @Override
 public Entry add(Entry entry) {
  return null;
 }

 @Override
 public void printList(String prefix) {
  System.out.println(prefix+"/"+name);
 }
}
